package com.lagou.edu;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * @author renpeiqian
 * @date 2021/7/13 16:11
 * @since
 */
@SpringBootApplication
@EnableDiscoveryClient //开启服务发现
@EnableFeignClients //开启Feign调用
public class AutoDeliverAppliation8090 {

    public static void main(String[] args) {
        SpringApplication.run(AutoDeliverAppliation8090.class,args);
    }

    @Bean
    @LoadBalanced //使用ribbon进行服务调用
    public RestTemplate restTemplate(){
        return  new RestTemplate();
    }

}
